#!/bin/bash

function log() {
    echo -e "$*"
}

if [ "$1" == "-h" ] || [ ${#1} -le 0 ]; then
    log "Usage: "
    log "\t $0 width height file"
    exit 1
fi

w=$1
h=$2
f=$3

cmd="mplayer -demuxer rawvideo -rawvideo w=$w:h=$h $f"
echo "$cmd"
$cmd

exit $?
